@include('admin.layout.css')
@include('admin.layout.js')




<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">




    <div class="layui-form-item">
        <label class="layui-form-label"> 能源标题</label>
        <div class="layui-input-block">
            <input type="text"  name="oli_title"  placeholder="请输入 商品名称" autocomplete="off" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"> 能源桶数</label>
        <div class="layui-input-inline">
            <input type="text"  name="oli_nums"  placeholder="请输入 能源桶数" autocomplete="off" class="layui-input" >
        </div>



        <label class="layui-form-label"> 价格</label>
        <div class="layui-input-inline">
            <input type="text"  name="price"  placeholder="请输入 价格" autocomplete="off" class="layui-input" >
        </div>


    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"> 立省价格</label>
        <div class="layui-input-inline">
            <input type="text"  name="oli_nums_down"  placeholder="请输入 立省价格" autocomplete="off" class="layui-input" >
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> 赠送会员</label>
        <div class="layui-input-inline">
            <input type="radio" name="vip_index" value="0" title="不赠送" checked>
            <input type="radio" name="vip_index" value="1" title="赠送" >
        </div>


        <label class="layui-form-label"> 上下架</label>
        <div class="layui-input-inline">
            <input type="radio" name="status" value="0" title="上架" checked>
            <input type="radio" name="status" value="1" title="下架" >
        </div>
    </div>








    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="submit" id="submit" value="确认">
        <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="取消">
    </div>

</div>


<script>




    layui.use(['laydate','form'], function() {
        let form = layui.form;
        form.on('submit(submit)', function(data){
            Api.add("{{route('admin.olis.add')}}",data.field,function(res){
                if (res.code !== 200){
                    Utils.errorToast(res.msg);
                    return;
                }
            });
        });


    });
</script>
